package com.css.apps.base.security.service;

import com.css.apps.base.security.model.SecParam;
import com.css.apps.base.security.model.SecurityParam;
import com.css.db.query.QueryCache;


public class SecurityService {

	public static String getParamValue(Integer paramId) {
		if (paramId == null) {
			return "";
		}
		SecParam item = QueryCache.get(SecParam.class, paramId);
		if (item != null) {
			return item.getParamValue();
		} else {
			return "";
		}

	}

	public static boolean isCA() {
		String loginStyle = getParamValue(SecurityParam.LOGIN_STYLE);
		if ("1".equals(loginStyle)) {
			return false;
		} else {
			return true;
		}
	}
}
